class Picture < ActiveRecord::Base
  # -----------------------------------------------------------------
  # Association
  # -----------------------------------------------------------------
  # une image est visible dans plusieurs albums
  has_and_belongs_to_many :album, :join_table => 'associations'
  # Une image concerne plusieurs commentaires
  has_many :comment
  # -----------------------------------------------------------------
  # Contraintes
  # -----------------------------------------------------------------
  # Champs obligatoires
  validates_presence_of :title
end
